<!-- top nav -->
<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <a class="navbar-brand" href="/admin/index/index">{C 'site_name' $appConfigs['site_name']}后台管理系统</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown">
                    <a href="{C ('site_url')}" target="_blank">
                        <span>浏览商城</span>
                    </a>

                </li>
                <li class="dropdown unhandle-message">
                    <a href="{url admin/message/index.shtml}" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                        <span>消息</span><span class="unhandle-message-counts-span"><span class="badge" >0</span></span>
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu unhandle-message-ul" role="menu">
                        <li style=""><a href="/admin/message/index.shtml" >查看全部</a></li>
                    </ul>
                </li>

                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">您好，{$myInfo[name]}
                        <span class="caret"></span></a>
                    <ul class="dropdown-menu user" role="menu">
                        <li><a id='js_global_my_info' href="#"><i class="glyphicon glyphicon-user"></i> 个人资料</a></li>
                        <li><a id='js_global_modify_info' href="#"><i class="glyphicon glyphicon-edit"></i> 修改账户</a>
                        </li>
                        <li><a href="{url /admin/login/logout}"><i class="glyphicon glyphicon-off"></i> 退出</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</nav>
<!-- template -->
<script id="global_myinfo" type="text/html">
    <div>
        <form id="global_editinfo" class="form-horizontal">
            <div class="row">&nbsp</div>
            <!--tmpl-fieldlist-->
            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 text-right">手机号码 </label>
                <div class="col-sm-4">
                    {$myInfo[mobile]}
                </div>
                <label class="col-sm-2 text-right">创建时间 </label>
                <div class="col-sm-4">
                    {$myInfo[addtime]}
                </div>
            </div>

            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 text-right">用户名 </label>
                <div class="col-sm-4">
                    {$myInfo[username]}
                </div>
                <label class="col-sm-2 text-right">最后更改</label>
                <div class="col-sm-4">
                    {$myInfo[updatetime]}
                </div>
            </div>

            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 text-right">工号 </label>
                <div class="col-sm-4">
                    {$myInfo[jobno]}
                </div>
                <label class="col-sm-2 text-right">登录时间 </label>
                <div class="col-sm-4">
                    {$myInfo[last_login_time]}
                </div>
            </div>

            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 text-right">电子邮箱 </label>
                <div class="col-sm-4">
                    {$myInfo[email]}
                </div>
                <label class="col-sm-2 text-right">登录ip </label>
                <div class="col-sm-4">
                    <?php echo long2ip($myInfo[last_login_ip]); ?>
                </div>
            </div>

            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 text-right">姓名 </label>
                <div class="col-sm-4">
                    {$myInfo[name]}
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 text-right">角色 </label>
                <div class="col-sm-4">
                    {if $myInfo[role_name]}{$myInfo[role_name]}{else}超级管理员{/if}
                </div>
            </div>
        </form>
    </div>
</script>
<!-- template -->
<script id="global_editinfo" type="text/html">
    <div>
        <form id="global_editinfo_form" class="form-horizontal" autocomplete="off">
            <div class="row">&nbsp</div>
            <!--tmpl-fieldlist-->
            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 control-label"><span class="asterisk">*</span>手机号码 </label>

                <div class="col-sm-8">
                    <input dtype="mobile" class="form-control" maxlength="20" name="data[mobile]" placeholder="手机号码"
                           required cname="手机号码" value="{$myInfo[mobile]}"/>
                    <p class="help-block"></p>
                </div>
            </div>

            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 control-label"><span class="asterisk">*</span>用户名 </label>
                <div class="col-sm-8">
                    <input dtype="" class="form-control" maxlength="20" name="data[username]" placeholder="用户名" required
                           cname="用户名" value="{$myInfo[username]}"/>
                    <p class="help-block"></p>
                </div>
            </div>

            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 control-label">工号 </label>
                <div class="col-sm-8">
                    <input dtype="" class="form-control" maxlength="12" name="data[jobno]" placeholder="工号"
                           cname="工号" value="{$myInfo[jobno]}"/>
                    <p class="help-block"></p>
                </div>
            </div>

            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 control-label">电子邮箱 </label>
                <div class="col-sm-8">
                    <input dtype="email" class="form-control" maxlength="35" name="data[email]" placeholder="电子邮箱"
                            cname="电子邮箱" value="{$myInfo[email]}"/>
                    <p class="help-block"></p>
                </div>
            </div>

            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 control-label"><span class="asterisk">*</span>姓名 </label>
                <div class="col-sm-8">
                    <input dtype="" class="form-control" maxlength="16" name="data[name]" placeholder="姓名" required
                           cname="姓名" value="{$myInfo[name]}"/>
                    <p class="help-block"></p>
                </div>
            </div>
            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 control-label"></label>
                <div class="col-sm-8">
                    <input type="button" class="btn btn-primary" id="extend_modify_password" maxlength="16"
                           name="data[name]" value="修改密码"/>
                </div>
            </div>
        </form>
    </div>
</script>
